﻿var $G=[];
$G['lang']={if:(isset(language.id))}{language.id}{else}0{/if};
$G['relative']='{path.relative}';
$G['items']={if:(isset(items.id))}{items.id}{else}0{/if};
$G['type']={if:(isset(items.type))}{items.type}{else}0{/if};

{if:(preg_match('/^(2|3|4|5)$/',items.type) && isset(get.id))}
$(document).ready(function(){
	$('notice[type][id]').each(function(){
		bosscms = true;
		$.post($G['relative']+'api/notice/?lang='+$G['lang'],{
			'type': $(this).attr('type'),
			'id': $(this).attr('id')
		},function(data){
			if(data){
				$('notice[type="'+data.type+'"][id="'+data.id+'"]').before(data.notice).remove();
			}
		},'json');
	});
});
{/if}